﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;

namespace Simple.Services;

public class QHSEGeneralDangerModel : ModelBase
{
    /// <summary>
    /// ID
    /// </summary>
    [MaxLength(32)]
    [Key]
    public string GeneralDangerId { get; set; } = "";

    /// <summary>
    /// 隐患性质编码
    /// </summary>
    [MaxLength(32)]
    public string? DangerTypeCode { get; set; }

    /// <summary>
    /// 编号
    /// </summary>
    [MaxLength(32)]
    public string? No { get; set; }

    /// <summary>
    /// 描述
    /// </summary>
    [MaxLength(1000)]
    public string? Description { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    [MaxLength(200)]
    public string? Note { get; set; }

    public override void ConfigureMapper(Profile profile)
    {
        profile.CreateMap<QHSESysGeneralDanger, QHSEGeneralDangerModel>()
            .ForMember(d => d.GeneralDangerId, options => options.MapFrom(s => s.GeneralDangerId));
        profile.CreateMap<QHSEGeneralDangerModel, QHSESysGeneralDanger>()
            .ForMember(d => d.GeneralDangerId, options => options.MapFrom(s => s.GeneralDangerId));
    }
}
